<template>
    <el-row :gutter="24">
        <el-col :span="22">
            <el-menu :default-active="activeIndex" class="topMenu" mode="horizontal"
                     @select="handleSelect">
                <el-menu-item index="1">我的主页</el-menu-item>
                <el-submenu index="2">
                    <template slot="title">我的项目</template>
                    <el-menu-item index="2-1">选项1</el-menu-item>
                    <el-menu-item index="2-2">选项2</el-menu-item>
                    <el-menu-item index="2-3">选项3</el-menu-item>
                    <el-submenu index="2-4">
                        <template slot="title">选项4</template>
                        <el-menu-item index="2-4-1">选项1</el-menu-item>
                        <el-menu-item index="2-4-2">选项2</el-menu-item>
                        <el-menu-item index="2-4-3">选项3</el-menu-item>
                    </el-submenu>
                </el-submenu>
                <el-menu-item index="3">我的文件</el-menu-item>
                <el-menu-item index="4">我的配置</el-menu-item>
            </el-menu>
        </el-col>
        <el-col :span="2" class="userInfo">
            <div class="userInfoName">张三</div>
        </el-col>
    </el-row>
</template>

<script>
export default {
    name: "topMenu",
    data: function () {
        return {
            activeIndex:"1",
            FIRE:require("./../assets/gameImg/fire.png"),
        }
    },
    methods: {
        handleOpen(key, keyPath) {
            console.log(key, keyPath);
        },
        handleClose(key, keyPath) {
            console.log(key, keyPath);
        },
        handleSelect(key, keyPath) {
            console.log(key, keyPath);
        }
    },
}
</script>

<style scoped>
.topMenu {
    width: 100%;
    height: 10%;
    background: #73b9a2;
}

.el-col {
    margin: 0px !important;
    padding: 0px !important;
    /*width: 100%;*/
}

.el-row {
    margin: 0px !important;
    padding: 0px !important;

}

.userInfo{
    /*width: 100%;*/
    background: #42b983;
    float: right !important;
    height: 100%;
    min-height: 60px;
    /*align-items: center;*/
    text-align: center;
    justify-items: center;
}

.userInfoName{
    font-size: 20px;

}

</style>